package org.jeecg.modules.music.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@TableName("mus_song")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "mus_song对象", description = "歌曲表")
public class MusSong implements Serializable {

    private static final long serialVersionUID = 1L;
    /**
     * id
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "id")
    private String id;

    private String songName;

    private String alias;

    private String description;

    @Dict(dictTable ="mus_artist",dicText = "cname",dicCode = "id")
    private String artistId;


    @Dict(dictTable ="mus_album_song",dicText = "listname",dicCode = "id")
    private String albumId;

    private String publisher;

    @Dict(dictTable ="sys_category",dicText = "name",dicCode = "id")
    private String genreId;

    @Dict(dictTable ="sys_category",dicText = "name",dicCode = "id")
    private String languageId;


    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date publishDate;

    public Integer duration;

    private String composer;

    private String lyricist;

    private String avatar;

    private String audioFile;

    private String lyric;

    private Integer delFlag;


    /**
     * 创建人
     */
    private String createBy;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新人
     */
    private String updateBy;

    /**
     * 更新时间
     */
    private Date updateTime;

    @TableField(exist = false)
    private MusArtist artist;

}
